home *** CD-ROM | disk | FTP | other *** search
/ Corel Medical Series: Cancer / Corel Medical Series: Cancer.iso / pc / program / glossary.dxr / 00001.ls next >
Encoding:
Text File  |  1997-02-06  |  1.4 KB  |  27 lines

  1. on buildGlossary initial, gap
  2.   set nextCast to new(#field, member (the memberNum of member initial + 1))
  3.   set firstLetter to upper(char 1 of field initial)
  4.   set nextList to new(#field, member (the memberNum of member initial - (91 - charToNum(firstLetter))))
  5.   set the name of member nextList to "GLO.LIST." & upper(firstLetter)
  6.   repeat with i = 1 to the number of lines in field initial
  7.     if line i of field initial = EMPTY then
  8.       if char 1 of field nextCast <> firstLetter then
  9.         set the textFont of member nextList to "Times New Roman"
  10.         set firstLetter to upper(char 1 of field nextCast)
  11.         set nextList to new(#field, member (the memberNum of member nextList + 1))
  12.         set the name of member nextList to "GLO.LIST." & upper(firstLetter)
  13.       end if
  14.       put line 1 of field nextCast & RETURN after field nextList
  15.       put upper(line 1 of field nextCast) & RETURN into line 1 of field nextCast
  16.       set the name of member nextCast to "GLO." & line 1 of field nextCast
  17.       set the name of member (the memberNum of member nextCast - gap) to "VOC." & line 1 of field nextCast
  18.       set the textFont of member nextCast to "Times New Roman"
  19.       if i <> the number of lines in field initial then
  20.         set nextCast to new(#field, member (the memberNum of member nextCast + 1))
  21.       end if
  22.       next repeat
  23.     end if
  24.     put line i of field initial & RETURN after field nextCast
  25.   end repeat
  26. end
  27.